<template>
	<view class="all">
		<view class="border">
			您在哪里找到这款产品的?
			<br />
			<br />
			<br />
			<br />
			<br />
		</view>
		<view class="choose">
			<view class="item" @click="onShopTime('store')">
				店内
				<img class="item_img" src="/static/right.png" alt="" />
			</view>
			<view class="item" @click="onShopTime('webside')">
				网上买的
				<img class="item_img" src="/static/right.png" alt="" />
			</view>
			<view class="item" @click="onShopTime('gift')" v-if="mode === 'after'">
				这是礼物
				<img class="item_img" src="/static/right.png" alt="" />
			</view>
		</view>
		<overall :back="true" color="#fff" :backgroupcolor='false' :main_logo="true" @login="login"></overall>
	</view>
</template>

<script>
	import overall from '../overall.vue'
	export default {
		components: {
			overall
		},
		data() {
			return {
				mode: null,
			}
		},
		onLoad(option) {
			this.mode = option.mode
		},
		methods: {
			onShopTime(mode) {
				if (mode === 'store') {
					uni.navigateTo({
						url: '/pages/choose/search_store'
					})
				} else if (mode === 'webside') {
					uni.navigateTo({
						url: '/pages/choose/search_webside'
					})
				} else {
					let status = uni.getStorageSync('login')
					if (status && status === 'success') {
						uni.navigateTo({
							url: '/pages/mail/photo'
						})
					} else {
						uni.navigateTo({
							url: '/pages/mail/mail'
						})
					}

				}
			}
		}
	}
</script>

<style scoped>
	.all {
		display: flex;
		flex-direction: column;
		min-height: 90vh;
		padding: 15% 5% 5% 5%;
		background-image: url(/static/1.webp);
		background-size: cover;
		background-position: center;
		background-repeat: no-repeat;
	}

	.border {
		margin-top: 40rpx;
		border-left: 6px #fff solid;
		padding-left: 40rpx;
		height: max-content;
		font-size: 19px;
		font-weight: bolder;
		color: #fff;
	}

	.choose {
		margin-top: 3vh;
		width: 100%;
	}

	.item {
		width: 100%;
		display: flex;
		justify-content: center;
		align-items: center;
		font-size: 14.5px;
		font-weight: bolder;
		background: rgb(241, 241, 241);
		height: 6vh;
		margin-top: 10px;
	}

	.item_img {
		width: 19px;
		height: 19px;
		color: #fff;
	}
</style>